import request from '@/utils/http'

// 饮食字典列表
export const query_all_food = (params) => {
  return request.get({
    url: '/api/diet/dict/all/dict',
    data: params
  })
}
// 查看个人饮食
export const query_get_food = (params: any) => {
  return request.get({
    url: '/api/diet/info/get/info/' + params.empi + '/' + params.date
    // data: params
  })
}
// 近一个月饮食
export const query_mouth_food = (params: any) => {
  return request.get({
    url: '/api/diet/info/get/' + params.empi + '/' + params.start + '/' + params.end
    // data: params
  })
}
// 个人饮食详情查看带搜索
export const search_food = (params: any) => {
  return request.get({
    url: '/api/diet/dict/get/' + params
    // data: params
  })
}
// 新增饮食
export const save_food = (params: any) => {
  return request.post({
    url: '/api/diet/info/save',
    data: params
  })
}
// 新增拍照饮食
export const save_photo_food = (params: any) => {
  return request.post({
    url: '/api/diet/info/photo/save',
    data: params
  })
}
// 编辑饮食
export const update_food = (params: any) => {
  return request.post({
    url: '/api/diet/info/update',
    data: params
  })
}
// 删除单个食物
export const delete_food = (params: any) => {
  return request.get({
    url: '/api/diet/info/delete/' + params
    // data: params
  })
}
// AI推荐饮食
export const ai_recommend_food = (params: any) => {
  return request.get({
    url: '/api/diet/recommend/today/diet',
    data: params
  })
}
// 判断是否推送过饮食方案
export const hasPushDietplan = (params: any) => {
  return request.get({
    url: '/api/diet/recommend/if/today/diet',
    data: params
  })
}
// 获取饮食补充问卷状态
export const get_questionnaire_status = (params: any) => {
  return request.get({
    url: '/api/question/info/getQuestionnaireStatus',
    data: params
  })
}
// 新增收藏
export const new_collect = (params: any) => {
  return request.post({
    url: '/api/diet/fav/save',
    data: params
  })
}
// 获取收藏、常用列表
export const get_collect_list = (params: any) => {
  return request.get({
    url: '/api/diet/fav/get/info',
    data: params
  })
}
// 获取食谱列表
export const get_recipe_list = (params: any) => {
  return request.get({
    url: '/api/diet/fav/get/recipe',
    data: params
  })
}
// 删除收藏
export const delete_collect = (params: any) => {
  return request.get({
    url: '/api/diet/fav/delete',
    data: params
  })
}
// 图片识别任务
export const pic_recognize_task = (params: any) => {
  return request.upload({
    url: '/api/third/healthai/boohee/food/recognition',
    file: params.path,
    formData: {
      empi: params.empi
    }
  })
}
// 图片识别结果
export const pic_recognize_result = (params: any) => {
  return request.post({
    url: '/api/third/healthai/boohee/food_recognition_detail',
    data: params
  })
}
// 判断饮食运动方案是否制定中
export const healthPanStatus = (params: any) => {
  return request.post({
    url: '/api/patientCycleTask/health-plan/status',
    data: params
  })
}